# Maintainer: Antonio Rojas <arojas@archlinux.org>
# Contributor: Rémy Oudompheng <oudomphe@clipper.ens.fr>

pkgname=m4ri
pkgver=20200125
pkgrel=2
pkgdesc='Algorithms for linear algebra over F_2'
arch=(loong64 x86_64)
url='https://bitbucket.org/malb/m4ri'
license=(GPL)
depends=(libpng)
source=(https://bitbucket.org/malb/m4ri/downloads/$pkgname-$pkgver.tar.gz)
sha256sums=('0dfb34aed351882a0f2281535ea6f81c690a5efeb14edab131d9ba0dffe44863')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr \
    --enable-openmp \
    --enable-thread-safe
  make
}

check() {
  cd $pkgname-$pkgver
  make check
}

package() {
  cd $pkgname-$pkgver
  make install DESTDIR="$pkgdir"
}
